package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 专业对象 sys_major
 *
 * @author mars
 * @date 2024-03-14
 */

@Data
@ApiModel(value = "专业对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_major")
public class SysMajor {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 专业名称
     */
    @Excel(name = "专业名称")
    @ApiModelProperty(value = "专业名称")
    private String name;
    /**
     * 所属院校
     */
    @Excel(name = "所属院校")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "所属院校")
    private Long schoolId;
    /**
     * 授课老师
     */
    @Excel(name = "授课老师")
    @ApiModelProperty(value = "授课老师")
    private String teacher;

    @TableField(exist = false)
    @ApiModelProperty(value = "院校名称")
    private String schoolName;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;
}
